﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using RMS.Controller;

namespace RMS.View
{
    public partial class Login : UserControl
    {
        private int _id;
        private string _username;
        private LoginController _controller;

        public Login()
        {
            InitializeComponent();
        }

        public LoginController Controller
        {
            get { return this._controller; }
            set { this._controller = value; }
        }

        public int Id
        {
            get { return this._id; }
            set { this._id = value; }
        }
        public string Username
        {
            get { return this._username; }
            set { this._username = value; }
        }
        public string TextBoxUsername
        {
            get { return this.textBoxUsername.Text; }
        }
        public string TextBoxPassword
        {
            get { return this.textBoxPassword.Text; }
        }

        private void buttonSubmit_Click(object sender, EventArgs e)
        {
            this._controller.HandleLoginButtonClick(this.TextBoxUsername, this.TextBoxPassword);
        }
    }
}
